package com.gaoshi.chapter4;

import java.util.Arrays;

public strictfp class UnicodeTest {

    public static final double CM_PER_INCH = 2.54;

    public static strictfp void main(String[] args) {
        System.out.println(Character.isJavaIdentifierStart('搞'));
        System.out.println(Character.isJavaIdentifierPart('搞'));

        int vacationDay = 12;
        System.out.println(vacationDay);

        double paperHeight = 11;
        double paperWidth = 8.5;
        System.out.println("Paper size in centimeters: " + paperWidth * CM_PER_INCH + " by " + paperHeight * CM_PER_INCH);
        System.out.println(1.0 / 0);

        double x = 4;
        double y = Math.sqrt(x);
        System.out.println(y);

        y = Math.pow(x, y);
        System.out.println(y);

        System.out.println(Math.PI);
        System.out.println(Math.E);

        System.out.println("The square of \u03c0 is " + Math.sqrt(Math.PI));

        int n = 123456789;
        float f = n ;
        System.out.println(f);

        double x1 = 9.997;
        int nx = (int) x1;
        System.out.println(nx);

        int m1 = 7;
        int n1 = 7;
        int a = 2 * ++m1;
        int b = 2 * n1++;
        System.out.println(a + "\t" + b);

        String[] s1 = {"a"};
        String[] names = Arrays.copyOf(s1, 5);
        for (String name: names) {
            System.out.println(name);
        }

    }
}
